/*
Copyright (c) [2019年5月1日] [吴超]
[MBT_studio] is licensed under Mulan PSL v2.
You can use this software according to the terms and conditions of the Mulan PSL v2.
You may obtain a copy of Mulan PSL v2 at:
		 http://license.coscl.org.cn/MulanPSL2
THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
See the Mulan PSL v2 for more details.
*/
#pragma once

#include <节点/节点.h>
#include <面/面.h>
#include "节点/编译声明代码.h"





API_EXPORT void	f_JIT_简单噪波生成(uint32 num, vec3* offset, vec3* scale, float32* 强度, bool 单例[3], S_F32Array* 噪波, float32 n);
API_EXPORT void	f_JIT_2D噪波生成(uint32 num, vec2* offset, vec2* scale, float32* 强度, bool 单例[3], S_Vec2Array* 噪波);
API_EXPORT void	f_JIT_3D噪波生成(uint32 num, vec3* offset, vec3* scale, float32* 强度, bool 单例[3], S_Vec3Array* 噪波);

API_EXPORT S_材质管线*	export_create_material(uint32 设备ID);

API_EXPORT int32 f_JIT_getGPU纹理ID(S_纹理* 纹理);
API_EXPORT int32 f_JIT_get字符纹理坐标(S_字体& 字体, S_Props& 文本, S_Vec3Array* 坐标, S_Vec2Array* 大小, int32* 坐标类型);
API_EXPORT void f_JIT_get字符纹理排列(S_字体& 字体, 
	S_Props& 文本, 
	S_Vec2Array* 坐标, 
	S_Vec2Array* 大小, 
	int32* 方向, 
	float32 缩放, 
	float32 间隔, 
	float32 上下偏移);

API_EXPORT void f_JIT_清除材质自定义网格数据布局参数(S_材质管线& 材质);
API_EXPORT void f_JIT_添加材质自定义网格数据布局参数(S_材质管线& 材质, const S_网格自定义属性* 属性);
API_EXPORT void f_JIT_添加材质着色器自定义参数(S_材质管线& 材质, E_值类型 类型, uint32 offset);

API_EXPORT void f_JIT_设置材质字体纹理自定义属性偏移(S_材质管线& mat, uint32 offset, S_字体& f);
API_EXPORT void f_JIT_设置材质纹理自定义属性偏移(S_材质管线& mat, uint32 offset, S_纹理* tex);
API_EXPORT void f_JIT_设置材质自定义属性值(S_材质管线& 材质, E_值类型 类型, uint32 offset, void* val);


API_EXPORT void f_JIT_get纹理属性(S_纹理* 纹理, uvec2& 分辨率, uint32& 通道, uint32& 位宽);

API_EXPORT void f_JIT_重新加载纹理(void* nodr_ptr, int32 帧);
API_EXPORT void f_JIT_绑定材质着色器(S_材质管线& 材质, const S_材质管线& 着色器母材质);
API_EXPORT void f_JIT_解绑材质着色器(S_材质管线& 材质);




API_EXPORT void f_node_所有材质纹理节点JIT初始化();
API_EXPORT void f_node_材质纹理计数环境创建(S_设备环境& 绘图环境);
API_EXPORT void f_node_材质纹理计数环境销毁();


